package org.edu.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TmBizopen entity. @author MyEclipse Persistence Tools
 * @author lzh
 * 2012-4-9
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "tm_bizopen")
public class TmBizopen implements java.io.Serializable {

	// Fields
	/**开业登记信息id*/
	private Integer id;
	/**纳税人名称*/
	private String taxplayer;
	/**法定代表人*/
	private String represent;
	/**身份证件名称*/
	private String idcard;
	/**证件号码*/
	private String cardno;
	/**注册地址*/
	private String regaddress;
	/**注册地址邮编*/
	private String regcode;
	/**生产经营地址*/
	private String productionaddress;
	/**生产经营地址邮编*/
	private String productioncode;
	/**主营*/
	private String mainmanage;
	/**兼营*/
	private String minormanage;
	/***/
	private String underorg;
	/**机关部门名称*/
	private String orgname;
	/**(工商执照)批准文件代号*/
	private String appid;
	/**(工商执照)批准日期*/
	private Date appdate;
	/**开业日期*/
	private Date startdate;
	/**有效日期*/
	private String validity;
	/**开户银行名称*/
	private String openbank;
	/**银行帐号*/
	private String account;
	/***/
	private String currency;
	/**是否缴税帐号*/
	private String accountrateplayer;
	/**经营方式*/
	private String managetype;
	/**登记注册类型*/
	private String regtype;
	/**所属行业*/
	private String trade;
	/**财务负责人*/
	private String financer;
	/**办税人员*/
	private String manager;
	/**联系电话(固定)*/
	private String phone;
	/**注册资本(人名币)*/
	private Integer regcapital;
	/***/
	private String remark;
	/***/
	private Date regdate = new Date();
	
	@Temporal(TemporalType.DATE) @Column(name="regdate",nullable=false,length = 10)
	public Date getRegdate() {
		return regdate;
	}

	public void setRegdate(Date regdate) {
		this.regdate = regdate;
	}

	//开业状态
	private TmOpenType opentype = TmOpenType.NOTOPEN;
	
	@Enumerated(EnumType.STRING)
	@Column(name = "opentype", nullable = false, length = 7)
	public TmOpenType getOpentype() {
		return opentype;
	}

	public void setOpentype(TmOpenType opentype) {
		this.opentype = opentype;
	}

	//登记号
	private String regno;

	//审核状态 0：未审核 1：审核通过 
	private TmStatus status = TmStatus.NOTCHECKED;
	
	@Enumerated(EnumType.STRING) 
	@Column(name = "status", nullable = false, length = 10)
	public TmStatus getStatus() {
		return status;
	}

	public void setStatus(TmStatus status) {
		this.status = status;
	}
	@Column(name = "regno", nullable = false, length = 20)
	public String getRegno() {
		return regno;
	}

	public void setRegno(String regno) {
		this.regno = regno;
	}

	/** default constructor */
	public TmBizopen() {
	}
	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "taxplayer", nullable = false, length = 30)
	public String getTaxplayer() {
		return this.taxplayer;
	}

	public void setTaxplayer(String taxplayer) {
		this.taxplayer = taxplayer;
	}

	@Column(name = "represent", nullable = false, length = 30)
	public String getRepresent() {
		return this.represent;
	}

	public void setRepresent(String represent) {
		this.represent = represent;
	}

	@Column(name = "idcard", nullable = false, length = 30)
	public String getIdcard() {
		return this.idcard;
	}

	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}

	@Column(name = "cardno", nullable = false, length = 30)
	public String getCardno() {
		return this.cardno;
	}

	public void setCardno(String cardno) {
		this.cardno = cardno;
	}

	@Column(name = "regaddress", nullable = false, length = 100)
	public String getRegaddress() {
		return this.regaddress;
	}

	public void setRegaddress(String regaddress) {
		this.regaddress = regaddress;
	}

	@Column(name = "regcode", nullable = false, length = 10)
	public String getRegcode() {
		return this.regcode;
	}

	public void setRegcode(String regcode) {
		this.regcode = regcode;
	}

	@Column(name = "productionaddress", nullable = false, length = 100)
	public String getProductionaddress() {
		return this.productionaddress;
	}

	public void setProductionaddress(String productionaddress) {
		this.productionaddress = productionaddress;
	}

	@Column(name = "productioncode", nullable = false, length = 10)
	public String getProductioncode() {
		return this.productioncode;
	}

	public void setProductioncode(String productioncode) {
		this.productioncode = productioncode;
	}

	@Column(name = "mainmanage", nullable = false, length = 100)
	public String getMainmanage() {
		return this.mainmanage;
	}

	public void setMainmanage(String mainmanage) {
		this.mainmanage = mainmanage;
	}

	@Column(name = "minormanage", nullable = false, length = 100)
	public String getMinormanage() {
		return this.minormanage;
	}

	public void setMinormanage(String minormanage) {
		this.minormanage = minormanage;
	}

	@Column(name = "underorg", nullable = true, length = 100)
	public String getUnderorg() {
		return this.underorg;
	}

	public void setUnderorg(String underorg) {
		this.underorg = underorg;
	}

	@Column(name = "orgname", nullable = false, length = 100)
	public String getOrgname() {
		return this.orgname;
	}

	public void setOrgname(String orgname) {
		this.orgname = orgname;
	}

	@Column(name = "appid", nullable = false, length = 10)
	public String getAppid() {
		return this.appid;
	}

	public void setAppid(String appid) {
		this.appid = appid;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "appdate", nullable = false, length = 10)
	public Date getAppdate() {
		return this.appdate;
	}

	public void setAppdate(Date appdate) {
		this.appdate = appdate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "startdate", nullable = false, length = 10)
	public Date getStartdate() {
		return this.startdate;
	}

	public void setStartdate(Date startdate) {
		this.startdate = startdate;
	}

	@Column(name = "validity", nullable = false, length = 30)
	public String getValidity() {
		return this.validity;
	}

	public void setValidity(String validity) {
		this.validity = validity;
	}

	@Column(name = "openbank", nullable = false, length = 30)
	public String getOpenbank() {
		return this.openbank;
	}

	public void setOpenbank(String openbank) {
		this.openbank = openbank;
	}

	@Column(name = "account", nullable = false, length = 30)
	public String getAccount() {
		return this.account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "currency", nullable = true, length = 30)
	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	@Column(name = "accountrateplayer", nullable = false, length = 30)
	public String getAccountrateplayer() {
		return this.accountrateplayer;
	}

	public void setAccountrateplayer(String accountrateplayer) {
		this.accountrateplayer = accountrateplayer;
	}

	@Column(name = "managetype", nullable = false, length = 30)
	public String getManagetype() {
		return this.managetype;
	}

	public void setManagetype(String managetype) {
		this.managetype = managetype;
	}

	@Column(name = "regtype", nullable = false, length = 30)
	public String getRegtype() {
		return this.regtype;
	}

	public void setRegtype(String regtype) {
		this.regtype = regtype;
	}

	@Column(name = "trade", nullable = false, length = 30)
	public String getTrade() {
		return this.trade;
	}

	public void setTrade(String trade) {
		this.trade = trade;
	}

	@Column(name = "financer", nullable = false, length = 30)
	public String getFinancer() {
		return this.financer;
	}

	public void setFinancer(String financer) {
		this.financer = financer;
	}

	@Column(name = "manager", nullable = false, length = 30)
	public String getManager() {
		return this.manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

	@Column(name = "phone", nullable = false, length = 30)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "regcapital", nullable = false)
	public Integer getRegcapital() {
		return this.regcapital;
	}

	public void setRegcapital(Integer regcapital) {
		this.regcapital = regcapital;
	}

	@Column(name = "remark", nullable = true, length = 100)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}